package com.shemy.sshiro.service.impl;

import com.shemy.sshiro.domain.SysMenu;
import com.shemy.sshiro.domain.SysRole;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.shemy.sshiro.dao.SysMenuMapper;
import com.shemy.sshiro.service.SysMenuService;

import java.util.List;

/**
 *  菜单ServiceImpl
 * @author Dzsom
 * @date 2019-05-09 10:56
 */
@Service
public class SysMenuServiceImpl implements SysMenuService{

    @Resource
    private SysMenuMapper sysMenuMapper;

    @Override
    public int deleteByPrimaryKey(Integer menuId) {
        return sysMenuMapper.deleteByPrimaryKey(menuId);
    }

    @Override
    public int insert(SysMenu record) {
        return sysMenuMapper.insert(record);
    }

    @Override
    public int insertSelective(SysMenu record) {
        return sysMenuMapper.insertSelective(record);
    }

    @Override
    public SysMenu selectByPrimaryKey(Integer menuId) {
        return sysMenuMapper.selectByPrimaryKey(menuId);
    }

    @Override
    public int updateByPrimaryKeySelective(SysMenu record) {
        return sysMenuMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysMenu record) {
        return sysMenuMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<SysMenu> findAllByRoles(List<SysRole> roles) {
        return sysMenuMapper.findAllByRoles(roles);
    }

}
